import { View, Text } from "@tarojs/components";
import { AtFloatLayout, AtIcon } from "taro-ui3";
import styles from "./index.module.scss";
import ChatInput from "./ChatInput";

interface CommentListProps {
    onClose: () => void;
    isOpened: boolean;
}
const CommentList = (props: CommentListProps) => {
    const { onClose, isOpened } = props;
    const onSend = () => {
        console.log("send");
    };
  return (
    <AtFloatLayout isOpened={isOpened} className={styles["comment-list-container"]} onClose={onClose}>
      <View className={styles["comment-list-header"]}>
        <Text className={styles["comment-list-title"]}>评论（12）</Text>
        <AtIcon value="chevron-down" size="30" color="#ccc" onClick={onClose}></AtIcon>
      </View>
      <View className={styles["comment-list-content"]}></View>
      <ChatInput onSend={onSend} placeholder={'说些什么...'}/>
    </AtFloatLayout>
  );
};

export default CommentList;
